package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Basic_Group", description = "班组信息")
@TableName(value = "Basic_Group")
public class BasicGroup extends FBaseEntity implements Serializable {



    @NotBlank(message="[班组编码]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("班组编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "code")
    private String code;

    @NotBlank(message="[班组名称]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("班组名称")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "name")
    private String name;

    @NotNull(message="[所属部门ID]不能为空")
    @ApiModelProperty("所属部门ID")
    @TableField(value = "departmentId")
    @Dict(dictCode = "dept_id",dictTable = "sys_dept",dictText = "dept_name")
    private Long departmentId;

    @NotNull(message="[工作中心]不能为空")
    @ApiModelProperty("工作中心")
    @TableField(value = "workCenterId")
    @Dict(dictCode = "id",dictTable = "Basic_WorkCenter",dictText = "name")
    private Long workCenterId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;

    @NotNull(message="[状态]不能为空")
    @ApiModelProperty("状态")
    @TableField(value = "status")
    private Long status;

    @NotNull(message="[工序ID]不能为空")
    @ApiModelProperty("工序ID")
    @TableField(value = "processId")
    @Dict(dictCode = "id",dictTable = "Basic_process",dictText = "name")
    private Long processId;






}

